package com.wysiwyg.flow.client;

import com.wysiwyg.common.web.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 流程服务Feign客户端
 */
@FeignClient(name = "wysiwyg-flow", path = "/flow")
public interface FlowServiceClient {

    /**
     * 查询流程状态
     * @param businessKey 业务键
     */
    @GetMapping("/status/{businessKey}")
    ServerResponseEntity<String> getFlowStatus(@PathVariable("businessKey") String businessKey);

    /**
     * 取消流程
     * @param businessKey 业务键
     */
    // @PostMapping("/cancel/{businessKey}")
    // ServerResponseEntity<String> cancelFlow(@PathVariable("businessKey") String businessKey);

    /**
     * 重试流程
     * @param businessKey 业务键
     */
    // @PostMapping("/retry/{businessKey}")
    // ServerResponseEntity<String> retryFlow(@PathVariable("businessKey") String businessKey);
}
